package org.layui.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 添加文章
 */
@WebServlet("/api/article/add")
public class ArticleAddServlet extends BaseServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        String title = req.getParameter("title");
        String content = req.getParameter("content");

        System.out.println(title);
        System.out.println(content);

        // 响应客户端
        print(resp, successJson("",200,"发表文章成功"));

    }
}

